// Decompiled by Jad v1.5.7f. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) 
// Source File Name:   CMILaunchData.java

package com.iphaeton.lms.course.scorm12.datamodel.cmi;

import com.iphaeton.lms.course.scorm12.DebugIndicator;
import com.iphaeton.lms.course.scorm12.datamodel.Element;
import java.io.PrintStream;
import java.io.Serializable;

// Referenced classes of package com.iphaeton.lms.course.scorm12.datamodel.cmi:
//            CMICategory, CMIRequest, DMErrorManager

public class CMILaunchData extends CMICategory
    implements Serializable
{

    public CMILaunchData(String launchData)
    {
        super(false);
        launch_data = new Element(launchData, "checkString4096", "NULL", false, true, true);
    }

    public CMILaunchData()
    {
        super(false);
        launch_data = new Element("", "checkString4096", "NULL", false, true, true);
    }

    public Element getLaunchData()
    {
        return launch_data;
    }

    public void setLaunchData(String inLaunchData)
    {
        launch_data.setValue(inLaunchData);
    }

    public String performGet(CMIRequest theRequest, DMErrorManager dmErrorMgr)
    {
        String result = new String("");
        if(theRequest.hasMoreTokensToProcess())
        {
            if(_Debug)
            {
                System.out.println("Error - Data Model Element not implemented");
                System.out.println("Element being processed: " + theRequest.getRequest() + "is not a valid element of the CMI Launch Data\n" + "Data Model Category");
            }
            if(theRequest.isAKeywordRequest())
                dmErrorMgr.recGetKeyWordError(theRequest.getElement());
            else
                dmErrorMgr.recNotImplementedError(theRequest);
        } else
        {
            result = launch_data.getValue();
        }
        theRequest.done();
        return result;
    }

    public void performSet(CMIRequest theRequest, DMErrorManager dmErrorMgr)
    {
        if(_Debug)
        {
            System.out.println("Error - Element cannot be set");
            System.out.println("Element is Read Only");
            System.out.println("Invalid LMSSetValue() request");
        }
        dmErrorMgr.SetCurrentErrorCode("403");
    }

    private static final long serialVersionUID = 0xd5df771d567336e5L;
    private static boolean _Debug;
    public Element launch_data;

    static 
    {
        _Debug = DebugIndicator.ON;
    }
}
